package com.todo.model.managers
{
	import com.todo.model.constants.Navigation;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	public class NavigationManager extends EventDispatcher
	{
		private var _navigationPath:String;
		
		[Bindable(Event="navigationChange")]
		public function get navigationPath():String
		{
			return _navigationPath;
		}
		
		public function updatePath( path:String ):void
		{
			_navigationPath = path;
			dispatchEvent( new Event( "navigationChange" ) );
		}
		
		public function updateAfterLogin( login:Boolean ):void
		{
			_navigationPath = login ? Navigation.TODO_LIST : Navigation.LOGIN ;
			dispatchEvent( new Event( "navigationChange" ) );
		}

		public function fault( error: Object ):void
		{ 
			
		}
			

	}
}